package com.gaoyi.crm.fragment;

import android.view.View;

import androidx.activity.result.ActivityResult;

import com.gaoyi.crm.R;
import com.gaoyi.crm.databinding.FragmentSyncBinding;
import com.gaoyi.crm.fragment.base.BaseViewFragment;

import java.util.Map;

public class SyncFragment extends BaseViewFragment<FragmentSyncBinding> {

    @Override
    protected FragmentSyncBinding getViewBinding() {
        return FragmentSyncBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void initView() {
        MyOnClickListener onClickListener = new MyOnClickListener();
        mBinding.tvCrmToMobile.setOnClickListener(onClickListener);
        mBinding.tvMobileToCrm.setOnClickListener(onClickListener);
    }

    private class MyOnClickListener implements View.OnClickListener{

        @Override
        public void onClick(View view) {
            int id = view.getId();
            if (id == R.id.tv_crm_to_mobile) {
                mController.navigate(R.id.action_syncFragment_to_ctmFragment);
            }else {
                mController.navigate(R.id.action_syncFragment_to_mtcSyncFragment);
            }
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onRequestPermissionsResult(Map<String, Boolean> result) {

    }

    @Override
    protected void onActivityResult(int requestCode, ActivityResult result) {

    }
}